﻿using AutoMapper;
using PcProject.Domain.Models.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PcProject.Application.Service.AutoMapper
{
    public class AutoMapperProfiles : Profile
    {
        public AutoMapperProfiles()
        {
            //构造函数中创建映射关系
            CreateMap<ProductDto, Product>();
            CreateMap<ProductCategoryDto, ProductCategory>();
            CreateMap<BrowseDto, Browse>();
            CreateMap<BargainDto, Bargain>();
        }

        //private void CreateMap<T1, T2, T3>()
        //{
        //    CreateMap<ProductDto, Product, ProductCategory>();
        //}

    }
}
